package 反射;

public class Test {
    public static void main(String[] args) throws ClassNotFoundException {
        Class c1 = Class.forName("反射.User");
        System.out.println(c1);
        Class c2 = Class.forName("反射.User");
        Class c3 = Class.forName("反射.User");
        Class c4= Class.forName("反射.User");
        System.out.println(c2.hashCode());
        System.out.println(c3.hashCode());
        System.out.println(c4.hashCode());

    }
}

class   User{
    private   int id;
    private  String  name;
    private   String  sex;
    private   double  height;
    private    double  weight;
    public    double  l;

    //public User() {
    //}
    //private  User(){

    //}
    protected User(){}

    public User(int id, String name) {
        this.id = id;
        this.name = name;
    }



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", height=" + height +
                ", weight=" + weight +
                '}';
    }
}
